#pragma once

#include "defines.h"
#include "Objects/Object.h"
#include "Graphics/SpriteAnimationManager.h"
#include "Components/Graphics/SpritesheetComponent.h"
#include "Context.h"

class Line : public star::Object
{
public:
	Line();
	~Line() {}
	
	void Update(const star::Context& context);
	void AfterInitialzed();
	void SetBorder(int leftborder, int rightborder);
	vec2 GetPosition() {return GetTransform()->GetLocalPosition().pos2D();}

private:

	int m_LeftBorder,
		m_RightBorder,
		m_LineWidth,
		m_LineCounter;

	float m_MoveSpeed,m_OrigSpeed;;

	std::vector<star::Object*> m_LineParts;

	Line(const Line&);
	Line(Line&&);
	Line& operator=(const Line&);
};
